# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-truststore
pkgver=0.8.0
pkgrel=0
pkgdesc="Verify certificates using OS trust stores"
url="https://github.com/sethmlarson/truststore"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-installer py3-flit-core"
checkdepends="
	py3-aiohttp
	py3-flaky
	py3-httpx
	py3-openssl
	py3-pytest
	py3-pytest-asyncio
	py3-pytest-httpserver
	py3-requests
	py3-trustme
	py3-urllib3
"
subpackages="$pkgname-pyc"
source="https://github.com/sethmlarson/truststore/archive/v$pkgver/py3-truststore-$pkgver.tar.gz"
builddir="$srcdir/truststore-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
9492874b2c0eb5ba011c0d4af6fc4e2d1664686458775344c928e25248b0d54f776d9400138330b225146402345ab8d5ccb9f73b5db51e566342855a8b4ac579  py3-truststore-0.8.0.tar.gz
"
